package com.example.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.example.util.RedisUtil;

@RestController
@RequestMapping("/redis")
public class RedisController {

	@Autowired
	private RedisUtil redisUtil;

	@RequestMapping("set")
	public String set(String key, String value) {
		redisUtil.set(key, value);
		return "ok";
	}

	@RequestMapping("get")
	public Object get(String key) {
		return redisUtil.get(key);
	}
}
